bb #6728: better safety check in cli_ac_free()