Fix removal of text node and run tests

In Chrome and Firefox, the prefix was not being removed after the list was
created. This PR fixes that.

Some of the tests are failing in Firefox still, but AFAICS this is a separate
issue (will create an issue).