Only add fields to query if they are in mapping fields.

Was previously adding fields into the query even if they weren't mapped
which meant that there were empty placeholders in the query.