Adapted test to new context item strategy, new error code.
New tests
Test XD0001 is raised if sequence appears for p:when/@test and @collection is missing