Fix for #1676

Added a failing test for issue #1676