Add tests for issue #883
Resolve issue #883