Fixed performance for 'depend' clause and common performance improvements