More get_roots() optimizations.