VID-1249 Guard against no rows