Ranking functions should preserve missing values #774