updates: Prevent crashes due to use after free

Should fix both of these issues:
https://retrace.fedoraproject.org/faf/problems/206547/
https://retrace.fedoraproject.org/faf/problems/242602/

https://bugzilla.gnome.org/show_bug.cgi?id=707480