Pre-select values when editing existing Version and Category filter

string_attribute() was called to convert the current value at the
beginning of the for loop. This required a matching call to similarly
convert the selected value passed to check_selected(). This logic works
fine when dealing with scalar types, but in the case of filters, the
parameter is an array, which string_attribute() converts to an empty
string, resulting in no values ever being selected.

string_attribute() is now called only to display the value in the
options list, and check_selected() works on raw variables.

Fixes #13937
Additional pre-select values corrections

Applying the same correction to other occurences of calls to
string_attribute() for check_selected(), as described in commit
b9297a7f03d30561d493803ae3eabd6bcdeccbb5

Affects #13937