[FIX] Fix potential crash in PRes forwarding

This change cleans up array access in PRes forwarding to avoid crashes
for invalid Node IDs.

Fix is based on work by John <chidrupaya.sr@kalycito.com>.

Change-Id: Id7ba14d40e8d92243fc8464ef7e38445c954aa22