Clean up omit_ids() not to set an extra element in idgap[]