Fix ?trsm bounds checks

Fixes issue #51.