Forward port of issue #21111 to 2.3.0.RC1.

Comment From: wilkinsona

The forward port of #21111 turned into a bug in 2.3 as it identified some deprecation warnings caused by configuration resolution. These have been addressed as part of the forward merge.