Ensure indexing by feature id is consistent throughout.

Changed the window lookup to used the dictionary based feature ids, and 
pulled out a bit of code to test and re-use for creating the feature id lookup.


Not sure if this was intentional or not /supernit