Fix duplicate nodes at the end of clipped polygon