Observational signatures of past mass-exchange episodes in massive binaries: The case of HD 149 404