Bug #1810: Fix oned crash when calling attachdisk with an improperly formated DISK template

Signed-off-by: Simon Boulet <simon@nostalgeek.com>
(cherry picked from commit 60b47c7183909acec28550834f0b32cb3b8a2382)