A remark on regularity of powers and products of ideals