Moved build_spec_lookup() out of Message class.