This commit adapts how the BasePackages bean is registered so that AOT processing works with it out-of-the-box. Previously we were using an instance supplier with the accumulated base packages. This commit changes that to set a constructor argument values. Closes gh-31223