Fix detection of selected values in product's attribute_iterator method.
Add tests for selected values in attribute_iterator.