Bugfix for bnc#846011

Backport from factory.