Added test for #646