Use Repo.isCommons() for deciding whether an image is from Commons

Change-Id: Id6b523d218a9abc9e886da4000962c6523d25dc0
(cherry picked from commit 3cebfe32bc992d421b23b4e6d36d5f7b7f6644e0)