AK-7198: Index rule with REGEX_ALL_PROPS includes relative node (backport r1822121, r1822201 and r1822808 from trunk)