If you'll look at line 3210 in store.c, AS.Olduflags was just copied into a newly allocated buffer, but then AS.Oldvflags (not AS.Olduflags) is set to that buffer, overriding the other newly allocated buffer it was set to just a few lines before.
The line 3210 in store.c should instead read AS.Olduflags = buffer;. It's a 1-character change.