Fix assertions about nonexistent atoms.