Fix modversions deletions when attached to deleted builds. Fixes #179