Move quoting of fields closer to where the where term is actually built.