set prevTexImage in setLastTexIndex, fix #2205