Lehner is still a prospect.
I'm not saying the divisional aspect didn't play into the trade, but the within the division fear is most prominent when a team is selling off a star UFA or a star for cap reasons in exchange for pieces that are of lower value, or won't make the team selling off their star better for years.
IE, Spezza wasn't going to an Atlantic team, let alone an Eastern team because Ottawa gave the team trading for him (Dallas) a top 6 center without actually making their own team any better any time soon.
In the Lehner trade, both teams got a what if. Granted Lehner is a lot more proven than any of the prospects who were around at 21, but he is still a what if.
If he becomes Rask, Varlamov, or Schneider, there'll be a lot of regret as those goalies are impossible to get...but that's a very long shot. Odds are, he becomes a middle of the pack or good starting goalie, which is something Buffalo could have eventually found without too much trouble so it was worth the gamble of giving them Lehner in order to get a much better return than Ottawa could have gotten from a Western team.
In certain scenarios, I'd be happier taking a lesser return to send him to Edmonton, but it would depend on the lesser return. 33rd+Legwand as a dump for Lehner? Assuming the Senators didn't think they'd be missing out on an amazing prospect by going back 12 picks, I'd do that instead.....but, it's impossible to know what was offered and who Ottawa thought would be where or how Ottawa saw the values based on scouting.