CAMEL-7064: Recognize existing nodes when iterating over provided path.

Fix for issue reported with CAMEL-7064. Also includes a unit test class to verify the fix.