Gidday Alex
A couple of mms difference is one thing; 20 mms + a "clonk" is another altogether.
At 40,000 Kms, your struts (shock absorbers) should be fine, but it does sound as though you have damaged one of them ...
.
Although more expensive, my instincts tell me to replace this sort of thing as a pair. Even the differences between manufacturing batches could give you problems. If not now, later.
Replacing one shock on something as crude as my old Landcruiser wouldn't cause me to turn a hair.
Having experienced just how sensitive our Subarus can be to slight misalignment (within spec) first hand, I am more than a little over-cautious about maintaining the balance.
You may also find that any problems are exacerbated with the fitting of heavy duty springs. Mine are variable rate (and a little heavier at full compression - about 17%), and came as a built kit, off the shelf - i.e. every part of the strut/spring assembly was replaced on both sides with parts that were identical to each other (springs, shocks, bumps, strut tops).
When the mechanic gets yours apart, it may be quite obvious if there is some damage. I suspect that if this is the case, he will probably advise you to replace both shocks, or whatever is damaged/broken. Keep the good one as a spare.