Fix authorization error with aliased tables