Fix a bug where it might be impossible to add a new device if it belonged to someone else before