Addressing latest problems in #1315

This patch fixes issues with resolving locality address information. Tested with 512 nodes.