Fix assertCompilationDiagnostingOn so that it doesn't improperly fail