disable the racy test for make_thread
generalize flatten for arbitrary sub-element types