added simple test to diagnose the problem
changed from testing equality of pointers to equality of underlying compositions