Make sure that CheckClassAdapter leaves classes unchanged. Also fix a bug in... Closes #317977 See merge request !351