… fixes #608. Code fix was provided by Kohske Takahashi.
Previously, when find_global() didn't find the variable in the global environment, it checked in the ggplot2 namespace with getNamespace(). This can cause problems because the function loads the installed package if not already loaded. During development, ggplot2 is typically loaded with load_all(), and loading the installed ggplot2 package can cause conflicts.