CORE-3987: fixed a bug that was preventing us from being able to permanently delete apps