This should cover all three cases.
Case 1 is part of the test in this PR, I will update to test to also cover case 2. We already have coverage for 3 in the test suite.