Modeling flexible behavior with remapping-based hippocampal sequence learning