You cannot walk through walls which have holes 2 blocks high with a chest before the hole.
But you can walk through the hole if there is a block directly above the chest.
This bug is very reproducible, the screenshots show you how to reproduce it, respectively.
Edit: This applies also to soul sand and end portal frames or generally, any block that is higher than a half slab but no full block.
Linked issues
is duplicated by 14
9 more links
Same with quicksand.