Remove the old code which was a temporary workaround (#10897)