It's more accurate to say the change by @sigmavirus24 duplicates this, since #6 predates #7.
Also, I raised an issue with that change before it was merged https://github.com/flintwork/mccabe/pull/7#discussion-diff-11782577R81

Getting the accounting right is going to be more accurate than trying to fix it after it was done wrong.
If a tree has more than one leaf node, #6 will be correct while #7 will not.