Copy correct size of arg flags buffer.

Fixes error discovered by nwc10++ and makes Valgrind clean again.