Fixed a bug in ImageDatabase init where a scanners next method would be called twice in one loop.