scan: only include tags once

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
scan: when searching for tags, handle multiple space separated blocks

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>