I checked this on two correct board that with erasing the MCU, the current go down but after programming it, the current go up!
I written the code with SPC5 studio that have a poor support and based on Eclipse. this compiler have some ready component that I don't see the generated codes and only can edit main.c . in this compiler there is a graphical pinmap editor and clock editor and each function of MCU have ready library, so copying my main.c code will not help you. may be there is a bug in libraries.