fixed bug in globals inliner which would cause function calls to be deleted