The problem appears to be the logic in ResultColumnList.expandAllsAndNameColumns(). It goes through the RCL, removes the asterisks in the list and inserts the columns that the asterisks should expand to. However, it does not adjust the index variable when it removes and adds elements in the middle of the very same list that it's iterating over. When the asterisk expands to more than one column, this makes the loop waste time on looking for result columns to expand inside the list of already expanded columns, but it doesn't actually cause any harm. However, if it expands to an empty column list, the loop will skip the next element in the RCL because the current list element was removed without decrementing the index accordingly.
This makes the statement in the bug description fail because t2.* is never expanded, and it therefore fails with a NullPointerException later when the RCL is processed by code that expect all such columns to have been expanded.