Current test won't work in DFDL v1.0 because it depends on being able to treat a variable like an accumulator. DFDL variables are single-assignment (keeps DFDL a functional language, instead of a state machine)
A similar test may be able to be created, but will need to use the newVariableInstance annotation. But I'm not sure.