fixes #4343

Last night quick hack is now living in solid unit testing :wink: 

@karlitschek @blizzz @schiesbn @icewind1991 @butonic THX