If you are using XSLT 1.0, then your variable named MaxLevel is a "result tree fragment" and you can't reference its content directly with a path expression, unfortunately. Your code would work in XSLT 2.0. In 1.0, many vendors have introduced an extension function of the form xx:node-set() where xx represents a vendor-defined namespace. This then allows you to say select="xx:node-set($MaxLevel)/Parent".
You didn't actually say how your code was failing so I may have the wrong end of the stick.
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference