fix bug 21400: image_icon being selected as default frame image

This is the master branch version of PR #298 .