The articulate bus is modeled as two connected vehicles. The back of the bus is presumed to follow the front of the bus. When the front of the bus is out of view, the software predicts its trajectory. The bug was that the rear of the bus is considered to follow that predicted location even if sensors show differently.
All in all, a very understandable coding mistake.