Add support for weaving local function calls