[modules] Don't assert when merging virtual functions that override other
functions. Also don't needlessly pull in non-canonical declarations of the
overridden virtual functions.