fix corner cases with slicing

@embray 
This is a suggested PR to fix a few minor problems I found with slicing. The examples below did not work as expected:

```
model = Shift(1, name='shift_x') & Shift(2, name='shift_y') | Rotattion2D(12, name='rotation')
model[1:]
# index does not exist
model[1:6]
#name does not exist
model['shift_x' : 'final']
```