Fixing bug 1240, false alarms of credit exceeded.

--HG--
extra : source : a2f9b69e5e501b3532b36f461bfb33e8707a20f1
Merging from main lsmb repo
Merge pull request #461 from einhverfr/master

Fixing bug 1240, false alarms of credit exceeded.