Wider detection of loopback interfaces

Closes #12811