Don't remove linked formulas when doing a 'cleanup'

Closes #16947.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>