[GtkCore] Make sure we were able to resolve the assembly before trying to add a reference

Fixes bug #10933