Invalidate stringID and index hint when key changes

Fix bug on PSGetIndex and PSSetIndex by invalidating the stringID and
index hint when the key changes.