Trac T9887: Add regression tests.