optimize volume/image placement a bit

No need to re-create the set in the loop when we can calculate it once
outside.

Signed-off-by: Jan Dvořák <mordae@anilinux.org>