bugfix due to capturing of thread index by reference
bugfix due to capturing of thread index by reference

live-clones/netgen,live-clones/netgen,looooo/netgen,looooo/netgen,looooo/netgen,live-clones/netgen,looooo/netgen,live-clones/netgen,live-clones/netgen,live-clones/netgen,looooo/netgen,looooo/netgen