handle any existing tilelayers when adding attribution control

Handling the case of existing layers being included in attribution control when not at map init.

Fixes #2177