How about a new module in utils.js checking name collision? So if necessary, this module is call first, then the extend can be called.