Add missing PT type to get_nameid to prevent from raising abort() -
Fix cr#1786