Recursive cascading lock loop