"It is the first quality of a criminal investigator that he should see through a disguise."In my recent talk on A Study in Scarlet at "A Gathering of Southern Sherlockians," I enumerated eight techniques that Sherlock Holmes uses throughout his career (not including deduction and eliminating the impossible, which occur in every story).
-- Sherlock Holmes, The Hound of the Baskervilles, Ch. 13
Of these eight, only one -- disguise -- does not occur in A Study in Scarlet. In fact, disguise is used against Holmes in chapter five, causing the detective to cry, "We were the old women to be fooled."
So perhaps the above quote can be read as a cry from the heart based on the experience of a cocksure young sleuth who found that he had a lot to learn.