I'm facing the exact same issue. Apparently, there is no workaround that I've found so far. The query keeps running and eventually fails with Outofmemory error.
The issue happens because of the self reference. This appears to be a defect since the self-reference nodes appear to be the ideal use case for graphs whereas they break while trying to find the nodes. Here is my query that is generated by SDN:
MATCH (n:Part) WHERE n.sku = "SKU000009" WITH n, id(n) AS __internalNeo4jId__ RETURN n{.allowCustomerReviews, __nodeLabels__: labels(n), __internalNeo4jId__: id(n), __paths__: [p = (n)-[:SOLD_BY|GROUPED_WITH|PART_OF|FITS_INTO]->()-[:SOLD_BY|GROUPED_WITH|PART_OF|FITS_INTO|MANUFACTURED_BY*0..]-()-[:MANUFACTURED_BY*0..1]->()-[*0..]-() | p]}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…