If you ever find yourself in a situation where SharePoint Designer insists that a master page, page layout, or CSS file is checked out and the same file in the SharePoint Gallery is shown as checked in then there is a problem with your SPD web cache. Attempting to check the file in through SPD gives the error:
"Cannot perform this operation. The file is no longer check out or has been deleted."
Solution:
Locate the WebsiteCache directory below and delete it:
Vista: %UserProfile%\AppData\Local\Microsoft\WebsiteCache
Windows 2003/XP: %UserProfile%\Local Settings\Application Data\Microsoft\WebsiteCache