TST: check that removing redundant internal nodes does not affect the weighted graph size