Some fixes to get tests working --checked mode.