Further investigation indicates that IPv4 literals (eg. 127.0.0.1) are mapped correctly when resolved, but names (eg. localhost) are not.