Key field with mapsTo breaks the cache

When key field has mapsTo - we need to rename from database fields to property names before checking the cache.

So we're just moving one line of code - and adding a special test-case to demonstrate the bug.