Src transform fixes

This adds support for `once:` constraints in src transform. It also fixes an off-by-one error that manifested when transforming long files.