Well if we're going that far, none of it would have happened if Kane hadn't come back.
Bottom line is, Kane should have been looking where he was going. If he was, he'd have seen Melody in time to avoid her and the school hall. Melody locking the doors wouldn't have been such a big deal if Kane hadn't crashed into the building.