#3604: treat TH with -dynamic in the same way as -prof