Add regress test for the bug from r605.