Port 67486ca03ed13a8827171c4dba0f5f77d0bd6f4c from dojo/dojox.