HAM is Norra so in worst case scenario plane will be parked in outstand in the far end of Non-Schengen side of HEL (long bus ride) or even worst scenario - next flight will be to MAN so plane will be parked in Non-Schengen gates and you de-plane through backdoor (slow) and still take the bus to Schengen area (around gate 20). For domestics they usually close gate quite early, like 15mins before dep time. Of course, in ideal situation it should work like mentioned before, but I wouldn't even try that.. Of course, if that goes wrong you can always take the train.