Improve testability of bind_by_name_helper