The culprit is %ensure-generic-function procedure. The procedure creates a generic function in passed library.
This is needed to make generic function implicitly (and unfortunately, there's a library depending on this behviour).
What we can do without removing implicit generation is that adding macro environment check. If the environment is not toplevel, then we don't have to make implicitly.