Since someone asked me why this code looks so strange, I thought I might as well explain in a comment. Maybe @fwinkl can comment as to whether my understanding is correct, obviously an incorrect explanation is worse than none at all.