I haven't been following up with all the changes. I just saw this from 7.7: 

Updated: RESTXQ function may now also be specified in main modules (suffix: *.xq).

I think I can work with all *.xq then. I'll let you know how it goes.