Optimal Lévy-flight foraging in a finite landscape