Wouldn't it be better to revert this? Find all the variables in the scope that are passed as arguments? Less looping