Fixed more bugs with the allocation of function ids

git-svn-id: https://angelscript.svn.sourceforge.net/svnroot/angelscript/trunk@1556 404ce1b2-830e-0410-a2e2-b09542c77caf