[IR] Add verification for module flags with the "require" behavior.
[Linker] Drop asserts that are embedded in cast<> and now checked by the verifier.