Set root factory in extension

Needed after 85a04435f19f2dfce854db44bae301d66a37a242