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