My understanding is that there was a "middle man" that basically insulated both sides from running into legal trouble. What you describe is in essence what happened. But, the way it worked is that Disney said "we are going to lay off our IT workers and outsource to a company that provides IT services (and save money by doing so)," then that IT company came in and said "we have a contract to do this job for this amount - we can't find Americans (at what we are paying) so we will bring in H1Bs to do the job." The Disney workers are told to train the new workers (provided by a different company) on their way out. But, the new ones aren't technically Disney employees - they are employed by the outsourcing company. Disney isn't the only company that does this, by the way...
Yes, it's a clear violation of the spirit of the law, which is why it resulted in congressional hearings (that basically went nowhere in the end). But, it's probably not a violation of the actual rules of the law.