Fixed unmerged code from apl_query_mod in APLQuery class.

Fixed a fail in the merge of apl_query_mod to staging, by manually
adding code to commit.