context analysis: split ordinal & clause finding

The previous logic had ordinal detection mixed in with ordinal
detection. This change splits them so they are done in different
phases, so read_clause only reads a clause.