Tree and wipeIn/wipeOut-based Toggler anim erratic when started while previous anim in progress

Description

Tree behaves erratically (that is, the animation jumps in various ways) when a node's +/- button is clicked
while a previous expand or collapse is in progress.
Toggler also behaves erratically (discontinuities, and attributes being animated out-of-sync with other attributes)
when showFunc/hideFunc are set to wipeIn/wipeOut.
I'll give recipes to reproduce some specific bad behaviors below.

My basic premise is that both of these widgets's animations should be continous in all cases, no matter in what crazy way the user clicks around on them, and so any discontinuities in their animations is a bug.

The discontinuities in both widgets apparently began with this commit, 6 years ago:

My recipe to reproduce these problems is based on the first Tree example and third (last) Toggler example from the docs.
I'm starting from the 1.7 docs, since that's the doc version whose code is most compatible
with dojo&dijit as they have changed over the past 6 years:

(note that the "example-2" is really example 3; that has since been fixed on the Toggler doc page).
I lengthened the animation durations to 2 seconds in both examples; I've attached the two modified examples.

To demonstrate various bad behavious, first save the two examples I attached, and put up-to-date dojo&dijit repos
in the appropriate places so they can be found by the example pages (i.e. put them under ../_stat