fix immutable set constructor to avoid the tree going crazy deep