Fix >=2009 query and add explicit ANDing