strengthened [Congruence.strict_invariant]

- this is implementation of feedback from Rasmus
- there's also a bugfix in [Misc], from the previous commit