be more defensive about not infinitely recursing