I fixed this by attaching all the attachment revisions to the last document revision. This is the only way I found to make this working.
In particular, I tried to attach older attachment versions to older document revisions and couldn't make it work.