build up doms programmatically. This occasionally fails (15%) with an image where the top panel has not been updated, and this is not understood.