Fix bug where incorrect type is exported for three-way intersections

This is caused by incorrect match of regex.