And the proceeds were entered into the corporation as debit cash credit retained earnings?
You do have a mess. I would go in and remove the land from the books with an offset to retained earnings based on the story you have told. I would then attach a friendly note to the return saying that land that was not owned by the corporation was improperly recorded in the corporation and you are now being merciful and backing it out. If you have to override something to get there, do the override and move on with life. Is there positive equity left in the corporation after the land removal?