If I needed to also visit referenced objects, I would write another enumerator EAllFeaturesEnumerator, and either include the recursion lock in that enumerator, or have that in a reusable Enumerator (VisitOnceEnumerator) that operates on an EAllFeaturesEnumerator (or any other Enumerator where you want to protect against recursion).