Merge "Stop thread from reattaching during runtime shutdown while tracing." into lmp-dev