Actually, this was on purpose. It modifies the string, so rather than pass in a const and have to make a local copy, I force a copy upon passing the parameter.