[delegate] Improve trampoline caching

This should now be fixed with commit https://github.com/ludovic-henry/mono/commit/ba00b234ae17f5189e3831f4c74a55b9d0e66e87