fix bug 1044068 - Prevent 'Cannot call execute of null' errors

This is a working PR and should be treated as such.  Likely lots of conversation below.

Still to complete:

- [x] - A test to confirm my PR prevents the issue.
That seems correct. The url is the same, so the key will always be the same.