tests: Add tests against regression for two previously fixed bugs.