The code to calculate the offsets into the SHM file wasn't properly respecting the skip flags, causing it to calculate offsets beyond the end of the SHM file.