Defect 1158 and updates based on changes to ASAVQuery.java