Thanks for the report.
This works as intended.
We don't want to do expensive checks for walls to update when tiles are being changed (through landfill or mod/script), so walls save if they were built next to water or not. You have to rebuild the walls to correct them.