Hm, may be I didn't have enough coffee.
I tested my change and though it worked like expected.
I'll have a look and either revert or come up with something better.