I know I'm a bit late to the party, but I believe this line is responsible for [GEOS-5149](https://jira.codehaus.org/browse/GEOS-5149).

It should test featureSource.getState().isExposePrimaryKeyColumns() before adding the PK column count to the offset.