Fix bug where has_active_children wasn't updated on post deletion/undeletion