Marking this as a fix to #122 since it will fix the issue in most cases and it allows loops since those can be valid constructs in some cases. Long term we still need to refactor this code.
Related Issue
Fixes #122
Type of change
[X] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
Description
Marking this as a fix to #122 since it will fix the issue in most cases and it allows loops since those can be valid constructs in some cases. Long term we still need to refactor this code.
Related Issue
Fixes #122
Type of change
Checklist before merging