Jacob (Israel) had twelve sons: Reuben, Simeon, Levi, Judah, Dan, Naphtali, Gad, Asher, Issachar, Zebulun, Joseph, and Benjamin (Genesis 29:32 - 30:24 and Genesis 35:18). However the twelves tribes turned into thirteen when Jacob gave Joseph a 'double portion'. This meant that each of his two sons, Ephraim and Manasseh, became a tribe, rather than just the one tribe of Joseph (Genesis 48:5). However this thirteen became twelve again as the tribe of Levi received no land. The Levites were only given certain cities and was the tribe of the priesthood that received tithes of the other twelve tribes who tithed from their land.
Therefore the difference between the first and second column is that Joseph was split into Ephraim and Manasseh, while Levi was dedicated to the Lord. In Revelation Levi is very conspicuously brought back along side of the others. Obviously this is very symbolic, indicating the priesthood is over. Now bringing Levi back is effectively going back to the time before Jacob gave Joseph the double portion, so technically Dan should still be on the list and Ephraim and Manasseh should not, being that they are already represented in Joseph! Truly this is odd and must have some symbolic meaning.
If we assume Dan is removed due to its idolatry, then Manasseh is added to fill Dan's place to keep the number twelve. Possibly the return of Levi and exclusion of Dan and indicates that the Levitical priesthood was over and original election according to the flesh really did not matter anymore. These tribes are actually symbolic of the whole invisible church 'extended' through history. This means they are not a strict grouping at a given time in history, otherwise Joseph and one of his sons would not be on the same list.