Only move/append an element if it's not attached