[BUGFIX beta] Fix serialize *_id case. Closes #5594

This isn't perfect; technically it's still possible for someone to have defined an `unknownProperty` that returns a meaningful value for `post_id` even if `!('post_id' in model)`. But that seems really bizarre if anyone's doing that.
`if (model.unknownProperty || name in model)` should guard against the `unknownProperty` scenario if we care...