Stable version.

Implements is_cube_merge_permitted_edge_neighbors,