daemon: Try and fix race unreferencing object in machines tests

Closes #678
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>