Related to #300 (closed). Implemented as described in https://gitlab.com/gitlab-org/container-registry/-/blob/dd50f6c5e1d23cf80785ce6f20d346042d6b5d6f/docs-gitlab/db/online-garbage-collection.md#deleting-the-last-referencing-tag.