Fixed: Adding an empty sequence of percepts caused short-term memory to be emptied
added guard against empty list of equivalent percepts