recurse upon finding a generic type parameter replacement because it could itself be a generic (closes #3107)