Fixed a bug where dummy_indices would only return the first dummy index.