fixed check for dependencies in constant template