I am not sure about your situation, but I have experienced similar troubles with mixing and matching forester vs legacy engines, the difference in that case was the cam pulleys, resulting in the need for a different timing belt. (This is assuming the intake is ok). The pulley has a slightly different diameter/number of teeth, if I remember right it is the drivers side pulley. The black plastic gear from the forester is definitely different from the legacy, not sure about the other models. There are also little protrusions cast into the back of this pulley for timing, these can be different as well.
I think if you swap all of your timing pulleys and gears from the original engine to the new you are ok, anyone else know if that is correct? You have to be careful because it can result in a one of a kind configuration if you do it this way.