[Bugfix] Fix serialization of publishing context

Make sure that the publishing context is serialized if there is no publishing
user set (which is a valid state).