I kinda almost did the same thing in my 99 2.5 RS coupe.
I removed the upper air filter, started the car, it stalled. Started, it stalled. I figures like they said, neded a gasket.
I spent 30 min cutting apart the air filter to get the gasket out, then using RTV and the gasket I put the upper box together.
24 hours later I took it for a quick ride. Got a rough idle once I went around the block.
Opened the top airbox, found with no support the rubber had seperated and created a vacuum leak again.
Then took the other car to the dealer, they had no idea about a gasket kit to put in there, so for $17 later I got an upper airfilter.
2 days later went to F&S Scoobie junkyard and bought the gasket from a rolled forrester.
That's in the car now.
I paid $40 for the gasket and a rear STB.