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).
See a4c80259515091cf69bd0583057bc97d5807221e