Simplify key mapping function

Calling map(None, []) is a valid identity operation, so the if-else
branch is removed.
Fix bug with non-unique dict keys

When a key function reduces a relationship-spanning column entry to the
leading field name (e.g., "home__lot_number" -> "home"), and there were
two or more columns with this same leading field name, the returned
list of valid database-backed fields was a random subset of the actual
list.