Fixed BUG 398501. Inclusing of functional.h was missing in the scan_by_key_inl file