'96 Subaru Outback

My grad student daughter’s Subbie dies when she hits the brakes. She pulls over and it restarts. The local mechanic can’t figure it out. Any ideas?

One possibility is a vacuum leak. If a leak from the brake booster is sufficient to affect the engine vacuum, it oould result in stalling.