add back protection for trapeziod degenerate into a rectangle

add back protection for trapezoid degenerate into a rectangle
this is needed to restore correct tracking behaviour until xml files are fixed