Fix for `instance_ids` helper when list is undefined

Note, this is against `release/0.9a22` branch