@ziggyism Thanks for the clarification, and for contributing a solution.

Would you mind adding some units tests that reproduce these issues?  That way we can verify your solution and ensure the issues continue to stay resolved.