Added global boolean to prevent autodiscover() from being called more than once.
Discover image generators during lookup

Fixes GH-241