Ah I see. Thanks for the explanation.
What I didn't understand was why the layer was working for one thing and not another. I've had a look at the MD5.pm and it's using XSloader, which I presume means the MD5.pm is using C and therefore bypassing the layer.
Having said that, if it was bypassing the layer I'd expect it to give the correct result.
John