Fix incorrectly merged changes

Function getRule was moved from Session.php to RuleEngine.php, so the changes needed to be applied to that file. (good illustration of the dangers of merge conflicts :-)