main/squark: fix crash in classification of certain urls

(cherry picked from commit e4209186efe7e176b3053e66c54d84f3d0ceb9c7)