Deleted custom event restricts to use the same name for variables / functions

The problem is still exist in 4.8. Functions are working now. But variables and all the other stuff still don’t work.