Forward port of issue #25050 to 2.5.x.

Comment From: dreis2211

Seems like a duplicate of #25052

Comment From: philwebb

Thanks @dreis2211 , I'm guessing it was from a local merge creating the issue.