Refs #5533 try threads with fitting moved inside function