Interaction and transformation of metastable defects in intercalation materials