WP-4712 Fixes an error when getting the nid.