Issue 1:
Putting

struct Foo end
struct Bar end

for t in (Foo, Bar)
@eval (::$t)(x) = 1
end

in a a package and using the --warn-overwrite=yes option, Julia will warn with

WARNING: Method definition Any(Any) in module Dup at /Users/kristoffercarlsson/julia/Dup/src/Dup.jl:9 overwritten on the same line (check for duplicate calls to `include`).
WARNING: Method definition Any(Any) in module Dup at /Users/kristoffercarlsson/julia/Dup/src/Dup.jl:9 overwritten on the same line (check for duplicate calls to `include`).

I'm guessing this if from #36609.

Looking at some random PkgEval log there are thousands of these warnings, e.g. https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_hash/aa3a19f_vs_dd12291/ADCME.1.7.0-beta1-ef3861cb06.log:

WARNING: Method definition Any(Any) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/io.jl:81 overwritten on the same line (check for duplicate calls to `include`).
** incremental compilation may be fatally broken for this module **

WARNING: Method definition Any(Any, Any) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/io.jl:98 overwritten on the same line (check for duplicate calls to `include`).
** incremental compilation may be fatally broken for this module **

WARNING: Method definition Any(Any) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/io.jl:98 overwritten on the same line (check for duplicate calls to `include`).
** incremental compilation may be fatally broken for this module **

WARNING: Method definition Any(Any) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/io.jl:103 overwritten on the same line (check for duplicate calls to `include`).
** incremental compilation may be fatally broken for this module **

WARNING: Method definition Any(Any) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/io.jl:110 overwritten on the same line (check for duplicate calls to `include`).
** incremental compilation may be fatally broken for this module **

WARNING: Method definition Any(Any, Any) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/io.jl:114 overwritten on the same line (check for duplicate calls to `include`).
** incremental compilation may be fatally broken for this module **

WARNING: Method definition Any(Any) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/io.jl:95 overwritten on the same line (check for duplicate calls to `include`).
** incremental compilation may be fatally broken for this module **

WARNING: Method definition Any(Any...) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/pyfncall.jl:86 overwritten on the same line (check for duplicate calls to `include`).
** incremental compilation may be fatally broken for this module **

WARNING: Method definition Any(Any) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/io.jl:82 overwritten on the same line (check for duplicate calls to `include`).
** incremental compilation may be fatally broken for this module **

WARNING: Method definition Any(Any) in module PyCall at /home/pkgeval/.julia/packages/PyCall/BD546/src/io.jl:94 overwritten on the same line (check for duplicate calls to `include`).
** incremental compilation may be fatally broken for this module **

cc @vtjnash

Issue 2:
atstart() function (or atinit())

similar to atexit(), but it runs the functions from Main just after reloading the system image or just after finishing the definition of a module

The existing functions

reinit_stdio() and librandom_init()

would be switch to being registered this way.