Only prepare first part of raw fields in queries (fixes #628)