D-16992 Clean up some code, added another test to account for Deproxy