fix Issue 12851 - ICE when passing const static array to template