PER-107: fixes related to $wgHooks