Prevent conditional layout from returning duplicates.