Did Malcolm in the Middle Retcon Stevie’s Mom?

I just noticed something weird in Malcolm in the Middle. In Season 1, Episode 1 ("Pilot"), Malcolm's teacher in his normal class is played by Merrin Dungey. But a few episodes later (S1E5, "Malcolm Babysits"), she reappears as Stevie's mom, Kitty Kenarban.

So, did the writers originally cast her just as a random teacher and later decide to make her Stevie’s mom? Or was this planned from the start? Curious if anyone knows more about this!