Improve height invariant test