Revert "[aot] Applied patch from "Andrés G. Aragoneses" <knocte@gmail.com>: Add types from the method header even for gshared methods."

This reverts commit 9231594314ab2d9d4b42ee1874882a72448788f1.
Add types from the method header even for gshared methods.