Recommit r246175 - Add Kaleidoscope regression tests, with a fix to make sure