L2P: Move the rule group lookup to the start of the function.