there must be 2 functions on same src-bucket for this to happen. OOM will happen when the second is attempted to be deployed.
Recursion detection may cause eventing OOM when allowInterBucketRecursion = true
Change is merged to mad-hatter branch
Build couchbase-server-6.6.0-7904 contains eventing commit 30fd84a with commit message:
MB-40767: Update parent map only when graph node is not visited
Both cases verified on 6.6.0-7905