explicit "public" scope bug for abstract functions

Fixes a bug where an abstract function results in an error that the public scope isn't defined.