Add tests for RT #117997