Use ALTER INDEX ALL instead of iterate through each index

This approach allows you to handle the heap, if there is a heap.
http://msdn.microsoft.com/en-us/library/ms188388.aspx

Notice
ALLOW_ROW_LOCKS = ON or OFF means To the heap and any associated
nonclustered indexes.
ALLOW_PAGE_LOCKS = ON means To the heap and any associated nonclustered
indexes.
ALLOW_PAGE_LOCKS = OFF means Fully to the nonclustered indexes. This
means that all page locks are not allowed on the nonclustered indexes.
On the heap, only the shared (S), update (U) and exclusive (X) locks for
the page are not allowed. The Database Engine can still acquire an
intent page lock (IS, IU or IX) for internal purposes.