Fix for source_images pull request

I'm sorry, I did what every good programmer should never do, i.e. make a small modification without testing it just before pushing it, thinking it would be a small refactoring.

It broke tests, here is a fix.