Emit warning on too many image layers

Fixes ZEN-13444