Wash sales aren't totally a bad thing. No you can't declare the $3 loss. HOWEVER, your cost basis on the new position is adjusted by the loss. You add the $3 loss to your purchase price to get your new cost basis. A downside may be, though, that your holding period includes the original shares holding period. You cannot convert a long-term loss into a short-term loss.
So, in your example, say you bought AAPL 14 months ago for $165, and sold it July 10th for $162. A long-term loss of $3. You buy back at $158 on July 23rd. This is a wash sale, you cannot claim a long-term loss. However, You can add the $3 to your basis. So instead of $158, your cost basis would be $161. If you sell at $165, you only realize a $4 gain for tax purposes. If you sell them for $158 on August 3rd (the same price you paid for the shares), you report a $3 loss. Again, your holding period, though, goes back 14+ months to when you first purchased the shares. So this would be a long-term capital loss. Which could be unfortunate if you wanted to offset some STCG.
Another downside would be a wash sale that brackets two tax years. So if you sold the shares the last week of December 2007 to offset gains, and repurchased them in the first week of January 2008, you'll lose the benefit for 2007.
Here's a pretty good reference: http://www.fairmark.com/