An exception happens when removing a resource from the Resources panel.
Created attachment 23714 [details] Proposed patch
Landed in r36826.