Add unregister_image(id) call

Change-Id: Ic2e2a49e7c3f59093d9b68b66948520ed18571a3
Fixes: bug #1237939