Hello,

In the file lib/galaxy/tools/actions/__init__.py for the execute function of the DefaultToolAction class line 198 has the following code: 

if trans.user and ( 'dbkeys' in trans.user.preferences ) and ( input_dbkey in trans.user.preferences[ 'dbkeys' ] ):


In this case trans.user.preferences[ 'dbkeys' ] is just returning a json string version of the dictionary. The result is that if input_dbkey is a substring of any part of this then it will be returned as True. Something like this would fix (though with the next lines of code it would be converting from json twice):

if trans.user and ( 'dbkeys' in trans.user.preferences ) and ( input_dbkey in from_json_string(trans.user.preferences[ 'dbkeys' ] )):

Cheers,
Andrew