Messy initial support for secondary indexes