Ported several old fixes from Code-11-SP3

Fixes for bnc#721520, bnc#728611, bnc#741071 are s390 specific.