Add a way to break out of this method's recursion

Hey there.

Take a look at this post.

Specifically, make sure you include which version of SonarQube you’re using and what the affected Rule ID is.