Make job priority query more robust
Merge "Make job priority query more robust" into release-0.11