#1102 - Make query honor archiveStatus and deactivated flags