Revert "Simplify handling of compiler second stage errors"

This reverts commit fa9292c4d02c3704a8ac70f3dd818530988c2c1c.