Ensure that we don't crash when loading an ImageDocument that sets CSP headers