Jelly, 7 bytes
¬ß€;LFṀ
A monadic Link accepting a list containing any strictly positive integers or nested, similar, lists that yields the maximal length list.
How?
¬ß€;LFṀ - Link, call this "f": list, A
¬ - logical NOT (vectorises) - convert all positive integers to zeros so that
we wont implicitly treat them as ranges
€ - for each element, E:
ß - call this Link (i.e. f(A=E))
L - length of A
; - concatenate
F - flatten
Ṁ - maximum