You'll have to read the source code.Instead of overwriting the module that comes with the kernel, you should install the replacement in /lib/modules/$(KVER)/updates (depmod automatically gives this directory higher priority).It is not the first time I heard about priority for directories in /lib/modules/$(KVER). Do you know where I can find an authoritative information ? I did not see anything in depmod(8) nor in modules.dep(5).
It's mentioned in depmod.conf(5). --Jayen