I've been screwing around with a new method of wall-detection lately... and I've stumped myself. What I'm doing is checking the walls surrounding all directions of the player, to make all the data easily-accessible. This saves me from having to do extra, conditional steps later.
Problem is...

Yellow blocks are where I'm doing 1x1 onwall2 checks.
The two tile layouts are very different, but as far as my script can tell they are identical. I definitely don't want the player to be able to slide through the first layout, but it cripples basic walking functionality when the player can't slide through the second.
Any suggestions? I'm trying to keep this method as simple as possible, and want to avoid making huge changes to the basic idea.