Bug 21460: Simplify the code to have only 1 assignment