Fix the assert in jpeg_converter
Before this commit, Krita would check twice for 'layer' instead of checking for both 'layer' and 'image'. Now it checks for image, too.