Fixed 'Bug 17535 - 'Complete statement' is badly broken' / implement new fixing engine