Settings filter: Account for non-string keys. Closes #1663
(cherry picked from commit 10f76cb)