You can't "fix" a bug by just increasing the nexus.
When a bug occurs, you must locate it in the code or in the files, and fix it there. Also, you should not distribute a game with a nexus of 400. First find out what for you need that huge memory size. Even big commercial games should normally be well below 200 MB nexus, and if you need more, you should know why.
A7 does not always allocate more memory when the nexus runs out - this only goes up to a certain limit. You can see the memory situation in the F11 panel.