Fix and regression test for ERRAI-672