I believe there is a bug in the code presented for updateTags() in the Photorama app, page 469. Details are here:
updateTags()