Fixed logic error is sparse vs. dense eigen bounds checking.