Fix "Can't modify frozen hash" error when project is destroyed See merge request gitlab-org/gitlab-ce!17816