Reimplement AnyValue fix, including test changes