Replace $wgTitle usage where it's not needed

Change-Id: I876229bd4a2076e78fe2c463fa6428fa15037094