Fix #1397: Better IR-checks for exported methods

Added checks:
- Exported name does not contain `__`
- Exported method is not static
Don't use `s` if you don't have any `$`.