The logic used to prune perturbed constraints from a mapping is broken, since it uses the in operator to check for the presence of a sire.legacy.Mol.Element("H") object in a set, which will only work if the object in the set is the same instance, or singleton type, which it isn't.
from sire.legacy.Mol import Element
H1 = Element("H")
H2 = Element("H")
x = {H1}
print(H1 in x)
print(H2 in x)
gives: