Hello there,
Well, simply put, this is not a bug or something because as your units get reinforcements after loosing men in battles, the new "recruits" that fill the blanls don't have the experience the remaining soldiers of the units have. As of thus, the unit loose in experience.
The more a unit is devasted, the more it will loose in experience (and ranks).
To prevent this, improve yourself by trying and using better strategies and tactics that reduce the number of casualties.
Here is an example:
Since last update in Empire : Total War, I experienced this situation during a 100 or so turns-game with only two troop (full). Even though I only fought with them, trying to reduce casualties, my units couldn't rank up ... so frustrating !
And I think it is the last update, because I never had this problem in a prior game.
However be reassured: in Shogun 2, you don't get "attached" to your units. I mean you don't really try to keep them and to make them rank up.
Since the battles are mainly melees, you can't help loosing a lot units so they generally can't rank up. Nevertheless, there is a good solution to this matter: if you develop correctly your cities, you might be able to recruit new units with much better ranking (I am at my 45 turns, and some of my castles can provide me with samourai archers ranked 9 !).
So this is a way to get good ranked soldiers !
I hope my answer helped you.
Enjoy your game !