Improved check if feature is in envelope in DynamicLegendComponentImpl