sgidec: fix off by 1 error that tested a sample too far for oob.