In some cases, an island of 2 or the last square of a larger island can only be expanded in two perpendicular directions. When this happens, regardless in which direction the island expansion will take place, the diagonal square must be part of a wall and is therefore shaded.
For instance, consider the following scenario:
The '2' clue can be expanded either upwards or to the left. But regardless of the direction, the cell diagonally up-left of the '2' clue will always have to be a wall. Hence, we can confidently mark it as such.