Fixed #165: restrictions with generic types didn't work for hierarchy types
Fixed ncurses sample