Deleting container throws error ERROR: Could not get subvolume flags: Invalid argument

If it works on a fresh install it suggests the issue is now fixed, but that your system got into an unknown state due to the bug, that needed manual fixing.

If you still have issues please file a bug over at Issues · lxc/lxd · GitHub