Arduino DUE not starting after turning power on

I have a project where I am using a DUE board to drive an LCD display. A strange behavior is driving me crazy that sometimes after turning the power supply on the display contains garbage because the sketch in the DUE does not clear it.

For a long time I thought that my LCD handling code piece (I am using my own 'lib', not UTFT and such) is not working properly and it fails to reset the LCD controller or something. Today I did a little bit more debugging and added a simple LED blinking functionality to have visual feedback that the uploaded sketch was started and working properly. According to this is seems that sometimes the sketch does not start at all. Is this possible somehow?

A simple power-cycle solves the problem and the sketch works properly. With some more observation it seems that the issue is triggered when the board is powered up after a longer period (5-10 minutes) of turned off state (having no power supply at all).

Does anyone experienced a similar issue? Any ideas what the hell is going on?

In case of an admin reading this post please move this thread to Products/Arduino Due category. It could be a better place for this question.