BAMPFA-330: handle imagenumbers and objectnumbers properly