Test for #1239.