Unexpected mass acquisition of Dirac fermions at the quantum phase transition of a topological insulator