Merge "Fix a crash when the same image is set repeatedly" into devel/master