Mark lookup of globals as @SlowPath

Suggested by Andreas Woess.

Also removed hasGlobal to avoid multiple lookups.

Signed-off-by: Stefan Marr <git@stefan-marr.de>