Fixes Issue 10984 - Better diagnostic for static function when attempting to access a symbol requiring frame access.
Merge pull request #2554 from AndrejMitrovic/Fix10984

Issue 10984 - Better diagnostic for static function frame access error