[delegate] Improve trampoline caching

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