Fix lookup of static functions. Closes #9.