This is a follow-up of https://forum.simutrans.com/index.php?msg=211051
Building a tunnel across the top of a sloped tunnel tile succeeds (tool_build_tunnel does not return an error) but no tunnel tiles are built.
Building a tunnel down a double slope will build tunnel tiles two levels below the intended height.
r11782 implements this check after fixing an error (no 3D coordinate check in route search if exit tile was on map ground, i.e. a portal.) That error must be in for at least 20 years.