path: Avoid a match for nested nodes of the same class
path: Avoid a match for nested nodes of the same class

Signed-off-by: Amitay Isaacs <a505e7c038746dbeb3edcd8d146dbd515432801f@ozlabs.org>
Tested-by: Rashmica Gupta <7c7908f246e3c843a2f4c2e4e52ed15aa16cad0a@gmail.com>

open-power/pdbg,open-power/pdbg,open-power/pdbg