With gerrit 178698, Scribunto's mw.title objects no longer increment the expensive parser function count upon creation, instead incrementing it when "expensive" properties such as title.exists are accessed.
While playing around with this new functionality, I found that for files, existence checks using title.exists and title.file.exists increment the expensive function count separately.
For example:
local title = mw.title.new( 'File:Example.png' ) local temp = title.exists temp = title.file.exists
This code will increment the expensive function count by two, even though it's checking essentially the same thing. The same goes for checking the other way around:
local title = mw.title.new( 'File:Example.png' ) local temp = title.file.exists temp = title.exists
That's also +2 to the expensive function count.
Ideally, both of these examples would only add one to the expensive function count, although I can't see this problem actually affecting modules in practice, as I can't imagine a reason for using both title.exists and title.file.exists on the same file.