Fix crash on attach/detach in the same tick

Remove descriptor from `NewDescriptors` when it is detached to fix this issue.