Test case for #396