Fix issue with passing encoded nodeID as nodeID.

Fixes #1638.