NPE when loading tiles (rebased onto develop)



This is the same as gh-2504 but rebased onto develop.

----

There is a NPE occasionally (seems to happen on nightshade only) when tiles are loaded; I have not been able to reproduce it. This PR doesn't fix the issue, but at least it gives us information about what image(s) is affected, when it happens next time.
There's nothing to test for this PR.