Type Inference for First-Class Messages with Feature Constraints