Unify commutivity fix

Fixes a bug in `is_commutative` in the unification module.