There was some reason for this complex canonical check code, but can't remember what :(
Factored out the red/black Kiraly tree from the generator, to allow for possible non-redundant generation code