Auto-publishing had a version comparison bug, causing it to attempt to republish old versions instead using next avaiable version number.