Fixes JBPM-3694. I've only tested it with the provided swimlane testcase, have not tested it with more complicated process definitions.