clashes with hooks

I noticed that when I have both a doc_opened hook in my extension as well as a startup script that creates a custom DocumentOpened event, they clash with each other and cause unintended results. For instance, a command that calls a function from the is returning None for HOST_APP.doc. If I disable the hook script, everything works fine. and when I have a print function in the startup script, the print window displays “hooks.doc_opened”, rather than “Starting Panel”

I can move code from the hook script to the startup script, just wanted to raise this issue to make it aware to others.