Fix a situation where next panics

sparseChildList next will panic when one of the child prefixes is an empty string "". This change just checks that the length of the prefix is greater than 0 before trying to access child.prefix[0]