For additional context read https://tracker.mender.io/browse/MEN-3513 (in the end this fix was applied to zeus branch)