Replace ingredient strings correctly

Fixes #1789