Collection query building with invalid symbols broken #323