Development version. Lazy ancestry function.