PARTIAL: Move name inference to function scope