tests: Add test case for #395