A tunnel is a road through the wall, and if you're asking pathfinder to ignore roads, it does ignore all roads, including those that are in walls. Actually, it would be quite weird to expect otherwise. If you want a complex logic like 'ignore this road, but not that one', I'd say it's time to use CostMatrix-es. Not a bug/As designed/Won't fix