Cleaned up some compiler error handling, and added a test for unrecognized types.