Only run LSM switches if they are needed.

Refs #1186