Description
We've had a null pointer exception because of a missing date in an attachment object;
We shall keep:
- the original version attachment, which has an historical version
- or the attachment with the highest revision
- or the attachment with the highest date
- or the attachment with the highest id (but this one wouldn't matter if the dates and revisions are equal anyway)