Comment 12 for bug 1365350

@John Dickinson :Thanks for your suggestion for its fix.
I have prepared patch. I will commit it after completing some test scenarios.

@Christian : Thanks for providing more clear picture about this problem and its solution.