Add test coverage for #628