Registry: Using enhanceCount is not reentrant, so pass along a visited hash instead.