Fixed bug where selects with optgroups would cause incorrect xpaths to be recorded in Selenium 2.