Runtime errors occurred when image diffs showed added or removed images
(as opposed to modified images). With this change, test cases are added
to encode behavior against future regressions, and diff builder logic is
updated to avoid the error.
Bug: Issue 5995
Change-Id: If04220256074dac245b971e6229f0dae4a175689