Add a test case for #12187, which appears to have been fixed

Closes #12187.