The value returned from this.getItems() is either incorrect, or shows up incorrectly in the hover debugger.
Make a program that contains only the following
var e = this.getItems();
Navigate to a time very early in the game (< 1 sec) where coins have spawned, so that visual inspection will be easy.
View the value of e. The coins listed in e are definitely different than the coins on the map, both in location and in type. As far as I can tell the calculations made using the coins are mostly correct (so the real coins must be returned somewhere? But the hover debugger is doing something weird here which makes it impossible to trace.)