/src/main/java/org/htmlunit/html/HtmlSelect.java
if ( element instanceof HtmlOption) {   final HtmlOption option = ( ( HtmlOption) ( element) ) ;   if ( option.isSelected( ) ) {     lastSelected = option;   } }
[Delete]
appendChild(newOption); ensureSelectedIndex(); } @Override public DomNode appendChild(final Node node) { final DomNode response = super.appendChild(node); <extra_id_0> final HtmlOption option = (HtmlOption) node; if (option.isSelected()) { doSelectOption(option, true, false, false, false); } } return response;