Fix for loading templates that require dependencies