I don't think you can overwrite that functionality. What you can do instead is maybe create a new custom Application Page to select master pages and page layouts, create an action menu for that page so that it displays in Site Settings, and using CSS or JavaScript hide the default link in the SiteSettings page.

I don't know if that makes sense or not, but that would give you full control over what displays and what doesn't.