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).
If you care about making it a boolean, you can use `!!`. I guess it depends on the use.

Here I find it a bit confusing, it looks like you're trying to get a binary value out, but actually you end up with a node. Using if-else may make this more obvious/readable.