This is a bug in the puppetlabs/stdlib module, and it was recently fixed with this pull request: https://github.com/puppetlabs/puppetlabs-stdlib/pull/561
The Forge version of stdlib has not been updated, but I expect the next official release will include the fix. In the mean time, you can apply the patch manually, or if you are using a control repository with a Puppetfile, make a reference to commit SHA 1c6ae4793f9ab8a3c4a15ec1a01563b42715879b for the stdlib github repository.
If you want to manually incorporate the pending change before the official module release appears, you can download these files:
Then you'll need to search for existing copies of those 2 files, back them up somewhere and copy the newly-downloaded versions into place.
NOTE: I have not tried this, so YMMV, but it appears to be safe enough to resolve the problem until the next official stdlib update.
NOTE #2: The other option you can use if you prefer not to modify the installed module code is to install an older version of the stdlib module. If you don't have any reason to use the absolute latest one, it appears that version 4.9.1 is the last version before the broken
package_provider fact appeared.