Fix bug that prevented remving the first inline

- Delegation was being done from an element that did not yet exist on
  the page.
- Moved delegation to top-level element in form