Add support for flags to TakeSnapshot