Revert 8606fb4eba5b96386a83428b9ce56c5ca3164343 and 40a60efd28b79a3b511b60791a5048dea0176e3f since the original problem had already been solved by handling FastImage::UnknownImageType in 0d806277f9c81c004d7b7cded71cd177e9b55231. See #660.