Fix prefix exception message (Closes #23364)
(maint) Improve test coverage for prefix and suffix
Merge branch 'pull-209'

This closes GH-209