Fix #1397: Better IR-checks for exported methods

Added checks:
- Exported name does not contain `__`
- Exported method is not static
Merge pull request #1398 from gzm0/ir-check-export-name

Fix #1397: Better IR-checks for exported methods