Detect cycles involving types bounded by singleton types

This fixes #193.