It does not seem to cause much harm in practice (the loop starts after it's done with what it's supposed to do), but it could probably have some performance impact (even if it should stop quickly with a stack overflow).
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.