(I just needed it for dynspawn follow-up work, really.) (cherry picked from commit fcd6fe0aac0b906e2cf8e2379d94a7d73384c160)