SONARPLUGINS-1805 Rule: Avoid definition of functions inside loops