Having done something, the search box is no longer visible on the master page although
<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox">
does exist on the page and search control is visible in SharePoint Designer.
There is a search.js in 1033 folder.
Make sure that the ContentPlaceHolder in the master page has not visible=false.
Also check that your layout pages do not have empty Content tags with ContentPlaceHolderId value
PlaceHolderSearchArea. If you do, they will override the respective Content on the master page.
Thanks to Ivan Inyushin for teaching me the wonders of ContentPlaceHolders.