What do you mean by "creates 16 threads"? 1) Do you see they simultaneously participating in the work? 2) Or do you see that 16 threads can join the work during the whole processing?
If (1) is true, please check whether another instance of task_scheduler_init already set the limit for this master thread (only the first specification matters)
(2) is expected behavior in case if you have 16 HW threads on your machine.
Also consider that any TBB scheduler-related call before an explicit task_scheduler_init is put on the application thread's stack will imply the default number of worker threads in that arena, as if there were an implicit task_scheduler_init that the explicit one could not override anymore. Could that be the case?
To be absolutely sure, try putting the task_scheduler_init instance right in main(), so that it is created before anything else and destroyed after anything else. If that works (most likely), try getting gradually back to where you were, to isolate and hopefully remedy the problem. If it doesn't (rather less likely), please provide more information about release version and whatnot, perhaps with a minimal reproducer.