Cleaner way to workaround lodash bug