This bug was recently fixed in GiNaC:
sage: ((x+sqrt(2)*x)^2).expand()
2*sqrt(2)*x^2 + 2*x^2 + x^2
This ticket will wait for Pynac to catch up and add a Sage doctest for the case.
CC: @kcrisman
Component: symbolics
Author: Ralf Stephan
Branch/Commit: 4b77d29
Reviewer: Frédéric Chapoton
Issue created by migration from https://trac.sagemath.org/ticket/18568