Fixed Substitute in non-input-order segfault - how has nobody triggered this before?

git-svn-id: svn+ssh://beta.visl.sdu.dk/usr/local/svn/repos/visl/tools/vislcg3/trunk@10272 cb2587b3-b7ff-0310-8c81-a2a651690ada