Recursive version.
Fails due to octave bug - reported.