Fix handling of non-string keys in filter_hidden_settings