Fixing bug #240: "'NoneType' object has no attribute 'get_uniq_id'"