Fixed a bug that could cause split() to get stuck in an infinite loop.