Enhance error reporting

We're now able to make the difference between a compiler bug and a user trying
to compile wrong thing, and report this correctly on the console.