Fix a few range checks in scePsmf. See #5051