gh-1880 + tests

Closes #1880