Making sure PT_CLASS_ADD_PROTO checks for PT_INVALID