fixes #4906 Doble AND in workflow query