I used the code you provided to split up a query of 100 into parts of 10 for a sliding widget using the jQuery Cycle plugin. There’s just a small problem with it, it serves me an 11th group with no entries.
I use /%post_id%/%postname%/
Works fine for pages with sub-pages and has the added benefit (for me) I can use a shortlink for the post like mysite.com/333/ instead of the full mysite.com/333/i-love-custom-taxonomies