[WFLY-2896] Fix possible NPE in link lookup