The Stability of Perovskite and Sphene in The Presence of Backfill and Repository Materials: A General Approach