Fix problem with detecting variables to import in nested function calls. Why did this work at all?