More tests and fixes for ERRAI-670