Make sure old versions are deleted when document itself is deleted