I agree `getBuilderMapping` will be called twice, but I'm not sure about a better alternative. I don't think it's a good idea to cache the result, so I think it just needs to be done twice.

I wonder if you could provide more guidance about how it could be done better?