There are many reasons for surge.
A mismatch can certainly cause it, ALL engines have it, but usually to a degree that you do not notice by careful matching of turbine and compressor sizes as well as other tricks.
caused initially by the pressure fluctuations of the pistons rising and falling.
Even though the mean mass flow rate might be greater than the surrge line, surge can still occur due to the minimum mass flow rate at the pulse(piston) peak can be low enough for this to occur.
Small ports keep gas velocity high so helping to eliminate or lessen surge.
tabetha