Fix EZP-21238: Error when an image alias isn't found

Passing the previous argument to NotFoundException causes
an error in legacy, as described in EZP-21214.