Violation of self-similarity in the expansion of a one-dimensional Bose gas