Steps to replicate the issue (include links if applicable):
(The steps is too cumbersome to omit here)
What happens?:
$wgExpensiveParserFunctionLimit is set to 500 in CommonSettings.php
https://zh.wikipedia.beta.wmflabs.org/wiki/User:RainBeforeSun/沙盒 is trying to call 933 #ifexist functions.
After more than 500 pages when calling mw.title.new().exists by lua it starts returning error too many expensive function calls: https://zh.wikipedia.beta.wmflabs.org/w/index.php?title=User:RainBeforeSun/沙盒&oldid=22666.
But in the plain wikitext version all #ifexist correctly return true: https://zh.wikipedia.beta.wmflabs.org/w/index.php?title=User:RainBeforeSun/沙盒&oldid=22663.
What should have happened instead?:
Parser should respect $wgExpensiveParserFunctionLimit.