You can't quite do that like this though. As it is, this leaves d->flags uninitialised. We either need to initialise it in vkd3d_shader_scan_add_descriptor(), or in each of the callers. That's an issue in the later patches in this MR as well, and for me at least the tests catch it.
Ugh, yes, thanks for catching that. That's what I get for submitting revisions without running the tests each time.