FAIMS-794: fixed bug with loading database layers with null query