Why is this function in module scope? Shouldn't it be put in the RefCounted implementation?