"Tracking" was supposed to mitigate this to some extent, but it tends to be a) used across the board for multiple subjects and b) used as a means of sorting students into winners (who are richly rewarded with status and additional opportunities) and losers (who are deprived of rewards and benefits rather than offered additional help and assistance.)
Universities use a modular approach to great effect: you can usually take any course (even graduate courses) if you've completed the prerequisites. And there are multiple ways of fulfilling graduation requirements.
A limitation of the university approach is that for a given course in a given term, everyone in the course is usually still in lock-step. Sometimes this is mitigated by offering multiple versions of a course with different time scales (usually an "accelerated" version for people who are familiar with the material and/or want to devote more time per week.)