Rewrite shp(ts) parsing to avoid offset issues.  Fixes #6822.