st/mesa: fix corrupted texture levels, when adding more levels than expected