Fix bug in termination of the multicore gc version w/o tasks