fix visibility of image compositing/scaling with -flto - closes #2413