Fixes #7598

Removes some code that should have been removed a while ago.

Alternative to #7618