Fixed tests error when switching to new invertable flatten function