There was no rule in place for Lewis. The rule exists today because of Lewis. One doesn't have anything to do with the other. If the contract is voided, it is no longer a valid contract, and absolutely should not count against the cap since it doesn't exist.
Also, the Celtics did get cap relief. The standard 50% it was just his base year rate and not the amount extended. The Owners didn't let the C's do more because there was no rule and they didn't want to open that can of worms. They did however create a rule for future situations.