Tags inside tags

How can I move a tag up in the hierarchy of tags? I have accidentally moved a tag into another tag and now I am unable to bring it back to the level of the hierarchy that it should be on.

A simple way I’d to drag and drop it to the desired parent tag or the tool level Tag group of the database.