Fix type-name parser which was too greedy

Forgot another try.