Cleanup compiler code for checking encoding directives