Fixed bugs related to the bound inference for a simple while-loop.