PostgreSQL 9.6 optimizer uses index even though it's slower
After adding an expression index to a table, you need to manually ANALYZE the table.  Otherwise PostgreSQL does not have access to the data it needs to make good decisions about the proper usage of that index.  It has to make wild guesses, and obviously those guesses are poor in this case (it thinks it will find 43462 rows, but actually finds 1237954)

Perhaps adding an expression index should automatically trigger an ANALYZE to take place--but currently it does not work that way.