WINDUP-377: Fixed xml rules, added <when> when was needed