Rollback refactoring changes - it removed required memoization.