Ensure the read only flag is set in time for LSM.

Otherwise we can wait forever doing a read on an empty LSM tree.