[[ Bug 10999 ]] fix crash when trying to flip referenced image
Merge branch 'bugfix-10999' into release-6.1.0