diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp
index 42e84b75eca20783090d1fc77d0b83ecdedfab28..e1ec50ab08ff9946528b2eb690d999130a97fc94 100644
--- a/src/mapblock_mesh.cpp
+++ b/src/mapblock_mesh.cpp
@@ -885,8 +885,9 @@ static void updateFastFaceRow(
 					&& next_lights[3] == lights[3]
 					&& next_tile == tile
 					&& tile.rotation == 0
-					&& next_light_source == light_source)
-			{
+					&& next_light_source == light_source
+					&& (tile.material_flags & MATERIAL_FLAG_TILEABLE_HORIZONTAL)
+					&& (tile.material_flags & MATERIAL_FLAG_TILEABLE_VERTICAL)) {
 				next_is_different = false;
 			}
 			else{