Test for #321 (fix in 1fcb4b83d4fdf4b1)