Versioning number incorrect when object is saved more than 10 times

[CR #331082] When you save the portlet or a catalog more than 10 times, the versioning number might not increment correctly.

Workaround: None.