Stupidly complicated lane allocation algorithm mkII