Filters can only search for values in the possible values for custom fields.
For a custom field you can specify a list of possible values. If this list changes there is no way
to search for values that no longer are valid to set. Even though they may have been set before.
A better way for the issues-filter drop down to populate its contents than using the list of possible
values would be to query the database for all unique values for a particular category.
select distinct(value) from custom_values where custom_field_id = <id number>;
This approach makes it possible to do a mass-update on issues with invalid custom-field values. This
is obviously hard if your aren't allowed to search for them.