Ticket/10866: INCLUDEJS fixes

Rewrote handler for INCLUDEJS, allowing it to be used with complex URLs