One thing my teacher does... I used it for that section in the glaz... is kind of tedious... it really makes you think...
First, as everyone else says, slow it down. This technique gets very mindbogging and if you're trying to do it fast the first time through, it'll be pretty rough. I don't remember the notes, so let's just use a G Major scale for an example. 16th notes. So the highest number of notes you have in one group is 4. That will be the limit for this exercise. So you start out doing 2's. Play the scale G A, A B, B C, C D, etc. For the twos, you always go back to the last note you played. Next, group it in 3's. G A B, A B C, B C D, etc. For 3's always go back to the middle note of the set to begin the new one. Then finally do it in 4's... G A B C, A B C D, B C D E, etc.
This REALLY works your muscle memory, and if you can concentrate through it, is something that I've found to make things stick in your head forever. I did the Glaz a while ago, and I picked it up about 2 weeks ago, just to see what I still remembered from it, and that section didn't mess me up in the least.