perf/core: Fix event inheritance on fork()