[DEV-1954] Wrap settings access in const in functions to prevent circular import.