Another trimming bug

Another attempt to try and fix the bug introduced two commits ago when
handling sequence sizes smaller than requested trimming margin.