This doesn't exactly answer your question, but since nobody else has answered, I have what could possibly be part of the solution.
If you split your module into two, one for managed handler requests, and one for everything else, then in your web.config, where you add your "managed handler request" module, you can add the attribute preCondition="managedHandler". So it would look like this:
<system.webServer>
<modules>
<add name="DynamicRequestModule" type="..." preCondition="managedHandler" />
<add name="StaticRequestModule" type="..." />
Given this configuration, the "DynamicRequestModule" module will execute only when the request is for a resource that has a managed handler.