Fix that DbQuery::renderFilter produces invalid filters

fixes #7749