Patches some logic holes in ZAS, specifically rebuilding and deletion.

Fixes #4273