Fixes #315: RangeError: Maximum call stack size exceeded when compiling large projects.