Sure.
Cypher uses a certain kind of uniqueness called relationship isomorphism, which means that a path cannot traverse the same relationship twice. More detail here:
A condition for an infinite loop when exploring a path is that the same relationships must be traversable without limit per path. Cypher's relationship isomorphism prevents this, so no infinite loops are possible with Cypher alone. (if you use a custom proc, such as one that uses the traversal API and changes the uniqueness behavior, then infinite loops can become a possibility based on what behavior is selected, but that's not the case here, and the APOC procs suggested use an even tighter form of uniqueness that would still prevent infinite loops).
We do have some Cypher changes on our backlog for allowing varied behaviors such as what you were expecting when we're after distinct nodes. No timeline for these, but we do have our eyes on this.
You can actually get some benefit already by adding DISTINCT in the WITH or RETURN that follows the variable relationship pattern, but it does require an upper bound to be present, which isn't the case in the original query.