Add a testcase for a recent regression.

Thanks to Bill Wendling for the original testcase.