APY-113: Query parameters don't work with X-Filter

fixed query bug when joins are constructed