Still more bug fixes

Should fix the following tickets:

https://trac.openmicroscopy.org.uk/ome/ticket/10720
https://trac.openmicroscopy.org.uk/ome/ticket/10837
https://trac.openmicroscopy.org.uk/ome/ticket/10942
https://trac.openmicroscopy.org.uk/ome/ticket/10952

When reviewing, please make sure that the problems noted in those tickets are resolved, in addition to verifying that all builds are green.