Made dialect scanning use multiple threads to run faster.