Subpages were enabled on template namespace of ptwikibooks on bug 15076, but this got disabled recently for unknown reasons, breaking some of our templates.
Test case: "{{SUBPAGENAME:Template:A/B/C}}" should return "C" but returns "A/B/C", as you can see at
https://pt.wikibooks.org/w/index.php?title=Especial:Expandir_predefini%C3%A7%C3%B5es&input=%7B%7BSUBPAGENAME%3ATemplate%3AA%2FB%2FC%7D%7D&contexttitle=&removecomments=true
Version: wmf-deployment
Severity: major