Trestle fixes

Fixes ticket #10356 and allows us to use the internal pyramid in Trestle files.