Create unique id for implementation of abstract pattern without ids and properly update variables in let.

Related to: http://code.google.com/p/schematron/issues/detail?id=5