No redrawing of the same image if it is already open.

This fixes #5691 and flickering issue on right-click or double-click of an image file.