When using Lua to transclude a wiki page using frame:expandTemplate{}, the edit section links in any transcluded headers direct to the page being directly viewed instead of the page originally containing the headers, resulting in either a "Cannot find section" error or going to the wrong section if clicked, depending on whether the viewed page has in itself a section with that number. The edit section link seems to be otherwise correctly formatted, even including the correct section number, but the page target (the title= parameter of the link) is incorrect.
Version: unspecified
Severity: normal