This is because in LocalizedImageResource, the style of the Image component (which is the combination of session.getStyle() and the variation) is stored in the LocalizedImageResource class.
I submitted a related issue as WICKET-1062. My problem being that the locale and style are transient and therefore don't get deserialized properly. I just thought I'd mention it since both of these issues happen at the same if statement.
John
