Fix false-negative in SObject#persisted?

It seems that the current implementation of `persisted?` can return false erroneously. See the included test.