test: Add two tests for issue #6272.

r? @graydon