This is basically a copy-paste of line 106.  To keep things DRY, perhaps factor out a small helper?

Not a big deal either way.