Unexpected Benefits of Self-Modeling in Neural Systems