Improve conversion of constants in lowercase.

Bug: issue 8968
Bug: issue 8969
Change-Id: I81a518f7b0906aefec2c6826210a1fe0588edb5d