Make factory recursive.