Correct an issue with DOM manipulation when the target input element has siblings