ProjectHelper: Rescue StackOverflow exception

Fixes #348.