I'd be happy to accept a GitHub pull request with tests for this.