Fix duplication of py:script contents and test against it