fix use nested Optional in PropertiesToPatternsHandler