After deploying an upgrade to a particular feature which contains ghostable page template, the page starts returning a 404 response.
In the SharePoint log, I get the following
Cannot get ghost document: Features\FeatureName\SubFolder\PageName.aspx
Unknown SPRequest error occurred. More information: 0x80070002
I am able to get the page working by going through SharePoint Designer and deleting the file, then deactivating/activating the feature on that site.
I've attempted resetting the web to its definition with no change.
I would like to have a programmatic solution, whether it be fixing something in the feature's configuration or an update program.