XPATH: Improved Stack Handling