XPATH: Fixed a bug in stack handling.