Thread:Adnoam/@comment-26115937-20170830153100/@comment-26115937-20170901235614

Ok, this is indeed more complicated than anticipated. I don't have any clever or elegant ideas atm.

I am not entirely clear on the timing of these magic words, but what about using template substitution instead of transclusion?

In the Options code the target page content is loaded using on the third line where     is the option name. It seem that this is the point at which DEFAULTSORT runs when  (and all of its constituent) templates are run and transcluded in turn. But what if we used   insteads? If I am reading the documentation right, it will simply strip up the code of the underlying template and assign it it #var:pc without (hopefully?) doing any preprocessing at this stage.

As I said this is me mostly just rumminating; I am not all that confident about this suggestion but I don't have any better ones at the moment...