Fix Issue 12568 - std.functional.memoize does not work with constant
arrays.
Merge pull request #2112 from AndrejMitrovic/Fix12568

Issue 12568 - std.functional.memoize does not work with constant arrays