ERR: include original error message for missing required dependencies
closes #23868

Resubmit of PR #26665, which was merged in a bit too eagerly!

Change to test hopefully avoids recursion, although like others, it doesn't reproduce locally for me.
