Fixed searching of a prefix of a key in object

I am sorry I didn't think of that in the first patch.