More clearly nest local variables

`nic` was used for both the outer and inner local variable, which is confusing in terms of which scopes belong when creating the `interface_names`, so this PR is designed to clarify that code and remove any ambiguity