Test case for #1627