Name simplification preserves Java generics.

Fixes gh-161