Make tail merging handle many more cases (all it can, I think).