Backport r7859 from 4.x-master (Henrik / Reported by Markus Krell)
Authored by: jccleaver 2016-01-20
Parent: [r7859]
Child: [r7861]