fix LP#1354652: crash when traversing internally loaded documents in XSLT extension functions
merge lxml-3.3 branch into master