After many attempts, it turns out this is as easy as remembering that where clauses can bound non-parameter types