Use parser's title rather than $wgTitle

Change-Id: I5bfe42c857ac2e6c8f8ea68f90aa6eff51a97955