As pointed out in the comments, the reason localhost or explicit loopback addresses are excluded from proxying is not quite a bug, it's on purpose.
Asking a proxy to connect to 127.0.0.1 for instance is often seen as a security risk and doesn't make much sense in the general case.
In the case of the DefaultProxySelector it's also a question of backward compatibility. See CR 4924226 for details.
However, we will see if we can use http.nonProxyHosts system property (or another existing one) to change that behavior when set with a special value.