An update on this. A closer inspection of the live system revealed that an older installation of Slimbox (which had also failed to run on the live system for me) had not been removed cleanly. Re-installing lightbox improved the situation and with the main image excluded from the gallery, I don't see the duplication issue.