Fixed an issue where offsets were not being masked, yielding negative array lookups.