Fix service parameter detection logic for minimal API validation filter (#67578)