Fixed resolving of leafref types with relative xpath.