Fixed nested function/class extraction bug