This is a lengthy function to have inline. Do you have any objection to moving it out of the local scope?