move helper function for active levels into checkpoint io (it was just too specialized to have it in MeshTools)