#2521: Adapted type discovery and type selector to allow the creation of generic programmable problems.