ptrace: cleanup check/set of PT_PTRACED during attach