When deciding wether we should inline a scope, look up the parents until we get to a function definition scope