Fixes for modules and tests that used null as record id.