Clarify rank documentation
Fix assertions