I had trouble finding the implementation of CURRENTMONTH in includes/parser.
It turns out it's implemented by Parser::getVariableValue in lowercase
switch ( $index ) { case 'currentmonth': ... do something
even though {{currentmonth}} in wikitext doesn't work. The only doc for the $index parameter to this function is @param int $index , but it's definitely not an integer.
A quick fix is to change the doxygen comment to something like
@param string $index Magic variable identifier. Note that it's lowercase by the time this function is called.
I think MagicWord.php converts from capitalized magic variables to lowercase internals, I'm not sure where this should be documented.