Skip short segments also in first and second derivatives