Show selected attributes based on id and not slug in product edit pages.

has_term when sent a string matches on term id, term slug and term name, when you have a size attribute with a term called X-Large and id of 20, and also a term called 20, then you search on slug it selects both X-Large and 20.

Changed to search on using the term_id, as when only integers are passed to has_term it will only search on the id field.