added a test (that still fails)
introduced the infrastructure for some visitors to have a customized
state.
Now detects cyclic refinements