Taskgroup completion now also clears itemsCompleted. Performance improvements based on http://jsperf.com/strict-vs-loose-in-if