I Googled the phrase "Terrain attached to pool wall" and found the following possible solution on two different sites (one of which was the Sims 3 forums, the other was a mod site):
What you need to do is make one wall directly above it on the next floor, delete all floor tiles around that wall, and then fill in the wall in the [bath]room. Afterward, remove the wall on the other floor and fill in the floor tiles.
There were no follow-up posts on either site to say whether this solution had worked, but I guess it would be worth a try.