elf image activator: convert asserts into errors
(cherry picked from commit 9cf78c1cf6e8909e4b5eaedeb86482904c0bbdc4)