Fix top-level pollution in case of function definition