Fixes some NoIdError exceptions that were not catched

Fixes some crashes due to some NoIdError not catched.

Change-Id: Id9bf861221fc8dd4b428179222100dfb5fa49648
Closes-bug: #1351081
(cherry picked from commit 32ccd5d5b463ef4842f0ac170815ee07f6a666b0)