I don't know the exact reason why the rhs is typechecked like that. Maybe because it would be tough to set the contexts correctly, though I'm not sure.