ensure scheduling priority is inherited into new threads (issue #5293)