Upgrading project from 5.0.3 to 5.1 results in a memory leak

@Evmatica Ah, I have not been able to work that out either - clearing the folder is unfortunately a bit of a blunt hammer.