Fix a warning.
Move some reads after lexical lookups.

This is in preparation for making allocation of scalars etc. lazier.