This bug, to my knowledge and in my experience, shows up (for me) only after building a place and moving sims in. My understanding is as follows:
A newly-built house has no registered routing, and if you messed aruond with your floor levels a bit, the game seems to not be sure on which floor your sim actually is, so defaults ("sinks/rises") to the floor level occupied before attempting to ascend or descend stairs. Sometimes living in that house for a sim week or so fixes it (as regular routes are registered), otherwise it usually requires deleting and replacing stairs, or in extreme cases a partial or complete rebuild. After replacing stairs, I still find at times that living in for a while is necessary. It's annoying but it is my standard test for any build I create, before posting it. Vector Mansion on my thread in houses and lots required such a rebuild (the entire back half was demolished). It was a nightmare but the house was too beautiful not to rescue.