Generalize a special case to fix PR187