Improve comment parsing when checking for requires

Previous the requires check would get confused on single line `/*`...`*/` comments, and would lose track of line numbers. This PR should fix that.