Fixed an issue which caused feature ids to change when exporting to PostGIS and SpatiaLite.