Fix infinite loop when editing schematics