Re-apply "Redmine#4755: directory tagging fixes, always generate release_id"

Reverting the commit did not stabilize test runs.