`selected` element is now properly set after html insertion
clean up of parent node references
added `selectedIndex` check
addition of unit test
Merge branch 'node-sethtml-fix' into dev-3.x