Bug 49400: Work around crasher in [[:de:Portal:Thüringen]]

See inline comment and the bug report for the problem description. This patch
merely avoids the crash and ensure round-tripping. Proper handling of
templates returning multiple image attributes remains to be done.

Change-Id: Ic7652979ec3d5fa35995aac9362c812ab4ede173