The multiplication order does matter, because the game usually rounds the numbers at every step instead of using decimals or floating point numbers. Ice gems are a power modifier, which means it's applied directly to ice beam's 95 base power. After the game calculates a damage number with the power, the Pokemon's attack and defense stats, and Vanilluxe's level, it applies the critical hit, STAB, and type effectiveness in that order. So your random order turned out to be correct.
source