Fix for reducing length in dojox/mvc/StatefulArray, fixes #17325 thanks asudoh.

(cherry picked from commit c7f962a8b4aee6bd7832a5eda01776fdf6b7c7ea)