How does the sentence end?

The school stood for longer than the factory had because the
factory was being neglected.