Somewhat burdensome trick (depending on how many platforms you have):
1) raise the terrain as you did
2) generate the Ai grid
3) before releasing, flatten the terrain again but don't regenerate the Ai grid
4) profit!
I've done a trick similar to that before but the problem is if I flatten the terrain to a level where they don't stick through the side of the wall, there are good sized gaps on top.
My strategy lately has been to straight up cheat and just angle the walls a bit.
Hmm, apparently Photobucket has had a conniption and all my pictures aren't working
EDIT: Ah good, they're back.