handle string-valued keys when overriding query methods to avoid endless recursion, should fix problem reported in #274.