Fix problem with references in lists

Added error checking to ensure words are a maximum of 32bit wide.
Fixed unit-tests with references to lists in a list.