Fix namespace function not using top level types