Update Query.php

Fix for tried to access unknown attribute capability