That seems very odd. I just checked with a few different characters, and all of them can learn up to 8 advanced skills. So let's sort this out.
1) Are you SURE your skill is getting replaced and not simply re-arranged? When you learn advanced skills, they don't pop into the slots in the order you learn them, but by a game-decided order (in order they were introduced into game?). So it's pretty common when you learn a new advanced skill, the new skill will appear in your character sheet as a non-colored icon someone in the middle of your skill list, and depending on what advanced skills, it could appear first. That might look like it replaced a skill.
2) Are you checking your advanced skills on your character sheet screen, or going by the hotkeys on the main screen?
3) If you're 100% sure the game is limiting you to advanced 5 skills:
a) Device, version of decide (i.e. iPhone 2400, laptop etc)
b) Game Version?
c) Where did you get your game? E.g. Google Play, Steam?
d) Is there anything special about your version of the game? Did you modify the games code, etc?
Oh, when you have all 8 advanced skills, you can't learn a 9th one. The buy icon stays unlit as if you didn't have the 5,000 gold to buy it. The game doesn't allow you to buy a 9th skill that replaces your first skill. Thus, the replacement aspect seems very odd.