fix functions that declare anons inside namespaces outside of classes