LeafRefValidation component is differentiating between absolute and relative path statements and applies different rules for resolution of unqualified identifiers.
This behaviour has no base in RFC7950 and the identifiers should be resolved in terms of referencing node only (i.e. absolute paths should resolve just like relative paths).