Follows rP26298.
This has not been fixed because the existing diffs try to be too general, IMO. The simplest solution is to either:
- Provide a convenience function in the component Manager that matches the API in the GUI / AI
- Use a javascript function that does the check.
This diff contains both fixes sothat people can decide which they prefer, but only one of the two should be merged.
ALso contains a fix for Survival of the Fittest that was missed.