Implement generalized object and type parameter bounds (Fixes #16462)