The possible meanings of this have been exposited, but largely consolidate around one of two views.
The first view says that the Jebusites were aware of the sayings of the children of Israel, which could already have been said at that time, which is that the false gods of the heathen are blind, lame and dumb. Therefore, the Jebusites, thinking that David would be unable to mount a successful attack against their well-defended position, took the opportunity to credit the defense of their city to the very idols which the Israelites had called blind and dumb, thus in effect trying to use the Israelites own saying against them. This view and the idea that one reason why David was allowed to win this battle was to defeat the boasts of the heathen as to their idols, it is in some ways reminiscent of what the sacred account later says in 1 Kings 20:28-
>And there came a man of God, and spake unto the king of Israel, and said, Thus saith the LORD, Because the Syrians have said, The LORD is God of the hills, but he is not God of the valleys, therefore will I deliver all this great multitude into thine hand, and ye shall know that I am the LORD.
The other view is as you described, which is simply that the Jebusites were mocking David's army by saying that the blind and lame within and without the city would be sufficient to guard it. This view however does not have the strength of explaining the extra bit of information we learn, that the reason we know why the heathens turned to their saying was because they already thought David could not win the battle. Obviously, if they thought victory was a foregone conclusion, and they felt no danger of defeat, then they would want to give credit in advance to their idols while at the same time attempting to dissipate the notion that they were lame and blind.
However, this backfired greatly as we can imagine after they lost the battle.