From the docs:
name_targets() does not preserve the name of the decorated function, so the name of the target must be provided as a parameter to add_target().
This can be avoided by assigning wrap.func_name = func.func_name in the name_targets source.