Fix for sequence rule when resources are already created

For Testing, create LPs and prepare all (add prerequisites, add them to course home, custom icons)
Then delete all from the next tables:
sequence
sequence_values
sequence_row_entity
Then refresh the course home page, and It will work

There is a bug, but this wouldn't be a problem, when delete these rows, the progress of LP keep stored in LP VIEW TABLE, then when the user enter to the LP will be same before delete sequence tables.