Add support for recursive thumbnail calls.

Fixes #149