Thanks to Olivier for pointing out a mistake:
> I've fixed issues in qmake [0] where for-loops caused similar problems.
> [0] e.g. https://codereview.qt-project.org/#/c/161133
That should have been:
[0] https://codereview.qt-project.org#/c/141305/14//ALL,unified
Eddy.