I noticed that with a tree of taxonomy terms the ul elements were not being nested correctly - the li which would be the nested ul's parent is being closed before the nested ul begins - whereas it should only be closed once the nested ul is closed.
This causes invalid mark-up, and CSS issues (n.b. I believe this is a report of the same bug:)
Here's a patch which fixes this behaviour, and produces valid mark-up (which is also a little more readable, with some line breaks added).
Please apply this patch to the module once you're happy with it.