Fix1846

#1846 reproduced by adding a failing test and fixed.