Tell Guile (and others) to look in install/lib/gnucash for libraries.
Without this Guile can't find libgncmod-engine and GnuCash won't start.
I don't know how this worked before, perhaps because the correct path
was in src/bin/overrides/gnucash-env.in
Bug 741228 - "Red line" threshold applies to Template scheduled transactions

Check for a GNC_SX_ID kvp on the split to exclude SX transactions from being blocked.
Extract function to clarify intent.