MANTA-20 adapt assertion to work with self-edges