Fix #10466 and get TestPythonImporter working again.

See discussion on https://github.com/joshmoore/openmicroscopy/commit/17916d0bf748ea09bb798d3affa7540d6f4ece5a