Remove the getInstance() method from Joomla\Filter\Input.
Use a closure in Joomla\Filter\Output::linkXHTMLSafe() to avoid an internal method in the class signature.