[fix] ensure correct short-circuit order for lKey index reference
[imp] add missing call to resolve environment variables in document path
[fix] handle non-text nodes types
[imp] standardise debug comments