Why does WordPress append numbers to page slugs sometimes? How to reliably style based on page

WordPress appends a number to your slug when the database already contains a duplicate slug. It will append the number even if the duplicate post or page has been moved to the trash.

The URL Routing system is one of the weaknesses of WordPress. Mike Schinkel made a very good proposal to evolve the re write engine on trac but the ticket was closed as “wont fix”