Strips out unperformant approach to WMS record querying.