fix Issue 3022 - scope x = new Foo; does not allocate on stack if Foo has allocator